package com.example.xzs.admin.userlogin.dao.repository.impl;

import com.example.xzs.admin.userlogin.dao.mapper.UserMapper;
import com.example.xzs.admin.userlogin.dao.repository.IUserRepository;
import com.example.xzs.admin.userlogin.pojo.entiy.User;
import com.example.xzs.admin.userlogin.pojo.vo.UserLoginInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
@Slf4j
public class UserRepositoryImpl implements IUserRepository {
    @Autowired
    private UserMapper userMapper;

    public UserRepositoryImpl() {
        log.debug("开始Repository层处理");
    }

    @Override
    public int insert(User user) {
       return userMapper.insert(user);
    }

    @Override
    public UserLoginInfoVo selectUser(String username) {
        return userMapper.selectUser(username);
    }
}
